package com.xy.servicemanage.action;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xy.servicemanage.request.AppRequestHelper;
import com.xy.servicemanage.request.RequestHelper;

@Controller
public class AppTservicesAction {
	private static final Logger log = LoggerFactory
			.getLogger(AppTservicesAction.class);

	public AppTservicesAction() {
	}

	/**
	 * 服务定义新增页面
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping("/req")
	public String request(HttpServletRequest request,HttpServletResponse response, ModelMap model) {
		String res=  AppRequestHelper.processRequest(request);
		try {
			response.setCharacterEncoding("GBK");
			response.getWriter().print(res);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}